{# 继承 layout 模板 #}
{% extends '../layout.njk' %}

{# 标题 #}
{% block title %}
添加员工
{% endblock%}

{# CSS #}
{% block cssLinks %}
{{ super() }}
{% endblock %}

{# 页面内容 #}
{% block content %}
<h3 class="title">添加员工</h3>
<div class="container">
    <form action="/emp/add" method="post">
        员工姓名:
        <input type="text" name="empName" >
        所属部门:
        <select name="deptId">
            {% for d in depts %}
            <option value="{{ d.id }}">{{ d.name }}</option>
            {% endfor %}
        </select>
        <button>添加</button>
    </form>
</div>
{% endblock %}